#!/usr/bin/perl
#

my $zone = $ARGV[0];
my $server = $ARGV[1];
use strict;
use Net::DNS;
my $res = Net::DNS::Resolver->new(
  nameservers => [qw(127.0.0.1)],
);
my $result;

  $res->tcp_timeout(10);
  my @zone = $res->axfr($zone);
  if (@zone) {
    foreach my $rr (@zone) {
      my $info = lc $rr->string;
#     $info = lc $info;
      my ( $V1, $V2, $V3, $V4 ) = split(' ', $info, 4);
      print("Vi=$V1, V2=$V2, V3=$V3, V4=$V4\n");
    }
  } else {
    print 'Zone transfer failed: ', $res->errorstring, "\n";
  }


